#ifndef __CHECK_H
#define __CHECK_H

#include <stdio.h>
#if defined(__cplusplus)
extern "C" {
#endif
#include <usuals.h>
#include <mpilib.h>
#include <memfile.h>
#include <docum.h>
#include <ipriv.h>
#include <pgp.h>
#include <keymgmt.h>
#include <crc.h>
#include <fileio.h>
#if defined(__cplusplus)
}
#endif

class CCheck
{
protected:
    bool m_bInitialized;
    bool LoadPrivateKey(char*,pSecretKey,char*);
    bool DoSign(char*,char*,int&,pSecretKey);
    bool LoadPublicKey(char*,pPublicKey);
    bool DoCheckSign(char*,int,char*,int,pPublicKey);
public:
    CCheck(void);
    virtual ~CCheck(void);
    
    int Sign(char*,char*,char*,char*,int);
    bool CheckSign(char*,char*,char* out=0,int size=0);

    bool operator!(void);
    bool operator==(bool);
};


#endif
